package top.xcxdl.rural.config.consts;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import top.xcxdl.rural.utils.ImageAddress;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Ding
 * @create 2022/6/9 21:01
 */
@Component
@ConfigurationProperties(prefix = "oss")
public class OssConst {

    @Value("${oos.file.filehost}")
    public void setFileHost(String fileHost) {
        OssConst.FILE_HOST = fileHost;
    }

    @Value("${oos.file.bucketname}")
    public void setBucketName(String bucketName) {
        OssConst.BUCKET_NAME = bucketName;
    }

    @Value("${oos.file.endpoint}")
    public void setEndPoint(String endPoint) {
        OssConst.END_POINT = endPoint;
    }

    @Value("${oos.file.keyid}")
    public void setKeyId(String keyid) {
        OssConst.KEY_ID = keyid;
    }

    @Value("${oos.file.keysecret}")
    public void setKeySecret(String keysecret) {
        OssConst.KEY_SECRET = keysecret;
    }

    /**
     * OSS-bucket名称
     */
    public static String BUCKET_NAME;

    /**
     * OSS-bucket路径
     */
    public static String END_POINT;

    /**
     * OSS-host：/resource
     */
    public static String FILE_HOST;

    /**
     * OSS-KEY_ID
     */
    public static String KEY_ID;

    /**
     * OSS-KEY_SECRET
     */
    public static String KEY_SECRET;




}
